package com.neibu.hw1;

/**
 * @author bin
 * @date 2025 - 04 -01
 **/
public class MyClass{

    public static void main(String[] args) {
        myface myface = new myface(){
            @Override
            public void yunSuan(String type,int num1,int num2) {
                switch (type) {
                    case "+" -> System.out.println(num1 + num2);
                    case "-" -> System.out.println(num1 - num2);
                    case "*" -> System.out.println(num1 * num2);
                    case "/" -> System.out.println(num1 / num2);
                    default -> System.out.println("输入类型错误");
                }
            }
        };
        myface.yunSuan("+",1,2);
    }
}
